package cac.fenjian.resource.WmsProdCertificate.service;

import cac.fenjian.resource.WmsProdCertificate.dao.MesPartCertificateDao;
import cac.fenjian.resource.WmsProdCertificate.dao.WmsProdCertificateDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

@Service
public class WmsCertificateService {
    @Autowired
    private WmsProdCertificateDao wmsProdCertificateDao;
    @Autowired
    private MesPartCertificateDao mesPartCertificateDao;

    //成品合格证插入
    public int WmsProdCertificateInsert(Map map){
        int result =0;
        try{
//            result =  wmsProdCertificateDao.WmsProdCertificateInsert(map);
            result =  wmsProdCertificateDao.insertWmsProdCertificateInsert(map);
        }catch (Exception e){
            e.printStackTrace();
            result = 0;
        }

        return result;
    }

    //零件合格证插入
    public int MesPartCertificateInsert(Map map){
        int result = 0;
        try{
//            result = mesPartCertificateDao.MesPartCertificateInsert(map);
            result = mesPartCertificateDao.insertMesPartCertificateInsert(map);
        }catch (Exception e){
            e.printStackTrace();
            result = 0;
        }

        return result;
    }
}
